package com.sensePlusVR.activity.guide;

import org.xutils.x;
import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;

import android.os.Bundle;
import android.view.View;

import com.sensePlusVR.base.BaseActivity;
import com.sensePlusVR.main.R;
import com.sensePlusVR.utils.AppManager;
import com.sensePlusVR.utils.Constant;
import com.sensePlusVR.utils.PerformancetTestUtil;

/**
 * 
 * @author: Loren
 * @create: 2016-7-1上午10:34:42
 * @desc: 引导界面
 * 
 */
@SuppressWarnings("unused")
@ContentView(R.layout.activity_guide)
public class GuideActivity extends BaseActivity{

	
	private static final String TAG = GuideActivity.class.getSimpleName();

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}
	
	@Override
	public void setMyContentView() {
		x.view().inject(this);
	}
	
	@Override
	public void initData() {
		super.initData();
		AppManager.getInstance().addActivity(this);
	}
	
	@Event(value = {R.id.guide_btn_yes,R.id.guide_btn_no})
	private void setViewOnClick(View view){
		switch (view.getId()) {
		case R.id.guide_btn_yes:
//			MySharedPreferences.save2(GuideActivity.this,
//					MySharedPreferences.NAME_NOT_CLEAR,Constant.IS_FIRST_INSTANT, true);
//			onBackPressed();
			//检测手机性能
			PerformancetTestUtil.startPerformancetTesting(this, Constant.GAME_MODE_VR,false);
			break;

		case R.id.guide_btn_no:
			onBackPressed();
			break;
		}
	}
	
	
	@Override
	public void onBackPressed() {
		AppManager.getInstance().finishActivity(this);
	}
}
